package com.powernode.ssm.controller;

import com.powernode.ssm.exception.BusinessException;
import com.powernode.ssm.pojo.vo.LoginVo;
import com.powernode.ssm.service.LoginService;
import com.powernode.ssm.utils.ResponseUtils;
import com.powernode.ssm.utils.ReturnCodeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@Api(
        value ="测试",
        tags = {"测试"})

@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    LoginService loginService;

    @ApiOperation("测试1")
    @RequestMapping(value = "/B109800",method = RequestMethod.POST)
    public ResponseUtils test1(HttpServletRequest request){
        throw new BusinessException(ReturnCodeEnum.FAIL.getCode(), ReturnCodeEnum.FAIL.getMsg());
    }

}
